<template>
	<view class="u-wrap">
		<view class="u-search-box">
			<view>
				<uni-search-bar class="uni-mt-10" radius="100" placeholder="搜索" clearButton="none"
					cancelButton="none" />
			</view>
		</view>
		<view class="u-menu-wrap">
			<scroll-view scroll-y scroll-with-animation class="right-box"
				@scroll="rightScroll">
				<view v-for="goods in goodsList">
					<uni-card :is-shadow="false">
						<view class="cardi">
							<image :src="goods.goodsUrl" style="margin-left: -40px;"></image>
							<div><text style="font-size: 20px;">{{goods.goodsName}}</text></div>
							<div><text style="font-size: 20px;margin-top: 20px;">{{goods.goodsNum}}</text></div>
							</view>
					</uni-card>
				</view>
			</scroll-view>
		</view>
	</view>
</template>

<script>
	import {
		request
	} from '@/network/http.js'
	export default {
		data() {
			return {
				goodsList: [],
				token:""
			}
		},
		onLoad() {
			this.token=uni.getStorageSync("refreshToken")
		request({
			url:`driver/ssminventory/findkc/${this.token}`,
			method:'GET'
		}).then(res=>{
			this.goodsList=res.data.inventoryList
		})
		},
		
		methods: {

		},
	}
</script>
<style lang="scss" scoped>
	image{
		width:50px;
		height: 50px;
	}
	.cardi{
		display: flex;
		flex-direction: row;
		justify-content: space-around;
	}
	.u-wrap {
		height: calc(100vh);
		/* #ifdef H5 */
		height: calc(100vh - var(--window-top));
		/* #endif */
		display: flex;
		flex-direction: column;
	}

	.u-search-box {
		padding: 18rpx 30rpx;
	}

	.u-menu-wrap {
		flex: 1;
		display: flex;
		overflow: hidden;
	}
</style>
